#{extends 'main.html' /}

  <div class="nav-tabs">
  <div class="box-div" style="width:350px;margin-top:40px;margin-bottom: 40px;">
        <form class="form-horizontal" action="@{UserSecures.verify }" method="post" id="defaultForm" role="form" >
        
    		<legend>登陆
    		<div class="pull-right"> 
                   <h6>没有账号？马上<a href="@{Application.register}">注册</a> </h6>
                   		${flash.error}
             </div>
    		</legend>
    		
		     <fieldset> 
		         <input type="hidden" name="randomId" value="${randomId }">    
			     <div class="form-group">
			       			<label class="col-sm-4 control-label" for="username">账号</label>
			         		<div class="col-sm-6">
			          		 <input type="text" class="form-control" name="username"   required="required" maxLength="12" placeholder="${flash.accountError}" value="${flash.account}" >          
			       			 </div>
			    </div>
			    <div class="form-group">
			      <label class="col-sm-4 control-label" for="pass">密码</label>
			        <div class="col-sm-6">
			         <input  class="form-control" type="password" name="pass" required="required" maxLength="12" placeholder="${flash.passwordError}" value="${flash.password}" >          
			       </div>
			    </div>
			    <div class="form-group">
			      <label class="col-sm-4 control-label" for="password">验证</label>
			       <div class="col-sm-6">
			          <p class="verification-img-box">
						 <img id="verificationImg" src="@{UserSecures.getCaptcha(randomId)}" onClick="javascript:setCaptcha();" class="verification-img">
					  </p>
					  <input class="form-control" type="text" name="captchaCode" placeholder="${flash.captchaCodeError?flash.captchaCodeErrorMessage:'请输入验证码'}" required="required">
					  <a href="javascript:setCaptcha();">看不清楚？换一张</a>
			        </div>
			     </div>
			     <div class="form-group">
			         <div class="col-sm-7 control-label" >
			          <button type="submit"  class="btn btn-primary">登陆 </button> 
			         </div>
			      </div>
		    </fieldset> 
		    
        </form>
   </div>
</div>
#{set 'moreScripts'}
<script type="text/javascript" src="@{'/public/javascripts/form.js'}"charset="${_response_encoding}"></script>
#{/set}

<script type="text/javascript">
function setCaptcha() {
	$("#verificationImg").attr("src","/usersecures/getcaptcha?randomId=4b380ff9-072b-4681-8f85-156cc13ef52a&time="+new Date().getTime());
}
</script>



